package cn.itsource.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author : 张金铭
 * @description :
 * @create :2022-11-16 09:40:00
 */
@Data
@TableName("t_user")
public class User implements Serializable {

    public interface Phone{}

    public interface Email{}


    private Long id;//id
    private String username;//用户名
    @NotBlank(message = "邮箱不能为空",groups = Email.class)
    private String email;//邮箱
    @NotBlank(message = "邮箱不能为空",groups = Phone.class)
    private String phone;//电话
    private String salt;//盐值
    @NotBlank(message = "密码不能为空")
    private String password;//密码
    @TableField(exist = false)
    private String configPassword;//二次密码
    private Integer state;//状态
    private LocalDateTime createtime;//创建时间
    private String headImg;//用户头像


    @TableField(exist = false)
    private String code;
}
